//
//  UIDevice+LSLDevice.m
//  LSL_IJKPlayer
//
//  Created by 大龙 on 18/1/10.
//  Copyright © 2018年 LSL. All rights reserved.
//

#import "UIDevice+LSLDevice.h"

@implementation UIDevice (LSLDevice)

+ (void)setOrientation:(UIInterfaceOrientation)orientation {
    SEL selector = NSSelectorFromString(@"setOrientation:");
    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[self instanceMethodSignatureForSelector:selector]];
    [invocation setSelector:selector];
    [invocation setTarget:[self currentDevice]];
    int val = orientation;
    [invocation setArgument:&val atIndex:2];
    [invocation invoke];
}
@end
